<?php	
	require_once("../Database.php");

	
	class TestComments{
		
		public $db;
		
		public function __construct($db){
			$this->db = $db;
		}
		
		public function test_getCommentsByNode($aid){
			print("<h3>Test getCommentsByNode()</h3>");
			
			$comments = $this->db->db_getCommentsByNode($aid);

			foreach($comments as $comment){
				foreach($comment as $key => $value) {
					print "$key : $value<br/>";
				}

				print("<br/>");
			}
		}
		
		public function test_getCommentsByAuthor($aid){
			print("<h3>Test getCommentsByAuthor()</h3>");
			
			$comments = $this->db->db_getCommentsByAuthor($aid);

			foreach($comments as $comment){
				foreach($comment as $key => $value) {
					print "$key : $value<br/>";
				}

				print("<br/>");
			}
		}
		
	}